{% extends "templates/public/base.html" %}
{% block title %}{{PageTitle}}{% endblock %}
{% block head %}
    {{ super() }}
    <style type="text/css">
        .important { color: #336699; }
    </style>
{% endblock %}
{% block content %}
	<table class="table table-striped">
	<thead><tr><td>#</td><td>Num_IID</td><td>Nick</td><td>Price</td><td>WishCount</td><td>Action</td></tr></thead>
	{% for item in items %}
		<tr>
			<td>{{item.key().id()}}</td>
			<td>{{item.num_iid}}</td>
			<td>{{item.title}}</td>
			<td>{{item.price}}</td>
			<td class="updatecount"><span>{{item.wish_count}}</span><input type="text" placeholder="{{item.wish_count}}" class="edit input-mini" mid={{item.key().id()}} /></td>
			<td>
				<a href="./admin.php" class="btn  btn-danger delete" mid={{item.key().id()}}>DELETE</a>
				<button class="btn btn-success detail" mid={{item.key().id()}}>FetchDetail</button>
			</td>
		</tr>
    {% endfor %}
	</table>
	<div class="pagination pagination-right">
  	<ul>
  	{% if page-1>=0:%}
  	  <li><a href="#" id="prev" page="{{page-1}}">Prev</a></li>
    {% endif %}
    {% if page>=2: %}
    	<li><a href="admin.php?page={{page-2}}">{{page-2}}</a></li>
    {% endif %}
    {% if page>=1: %}
   	 <li><a href="admin.php?page={{page-1}}">{{page-1}}</a></li>
    {% endif %}
    	<li class="active"><a href="admin.php?page={{page}}">{{page}}</a></li>
    	<li><a href="admin.php?page={{page+1}}">{{page+1}}</a></li>
    	<li><a href="admin.php?page={{page+2}}">{{page+2}}</a></li>
    	<li><a href="#" id="next" page="{{page+1}}">Next</a></li>
 	 </ul>
	</div>
	<div id="successModal"  tabindex="-1" style="display:none;" class="modal">
		<div class="modal-body">
    		<p>已保存</p>
  		</div>
	</div>
	<div id="faildModal"  tabindex="-1" style="display:none;" class="modal">
		<div class="modal-body">
    		<p>保存失败</p>
  		</div>
	</div>
	<div id="FetchSuccessModal"  tabindex="-1" style="display:none;" class="modal">
		<div class="modal-body">
    		<p>获取详细成功</p>
  		</div>
	</div>
	<div id="FetchFailModal"  tabindex="-1" style="display:none;" class="modal">
		<div class="modal-body">
    		<p>获取详细失败</p>
  		</div>
	</div>
{% endblock %}